/**
 * Created by zhengkunming on 2017/2/8.
 */

/* @var $ */

//jQuery实现

/**
 * 页面先引入jquery
 * <script src='//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script>
 */

//方式一
$.getJSON("http://crossdomain.cm/services.php?callback=?", {}, function (data) {
    // code...
});

//方式二
$.get('http://crossdomain.cm/services.php?callback=?', {}, function (data) {
    // code...
}, 'jsonp');

//方式三
$.ajax({
    url: "http://crossdomain.cm/services.php",
    dataType: "jsonp",
    data: {},
    success: function (data) {
        // code...
    }
});

//jquery > 1.5
$.ajax({
    url: "http://crossdomain.cm/services.php",
    dataType: "jsonp",
    data: {}
}).done(function (data) {
    // code ...
});